const { getAllBanner, updateBanner } = require("../Dao/bannerDao");
const { FormatJson } = require("../utils/tool");

// 获取所有标语
exports.getBannerServices = async function () {
    let result = await getAllBanner();
    for (const items of result) {
        delete items.deletedAt;
    }
    console.log(result)
    return FormatJson(0, "", result);
}

// 修改标语
exports.updateBannerServices = async function (updateInfo) {
    return FormatJson(0, "", await updateBanner(updateInfo))
}